package com.belarus.kamianiec.photo.photoSite.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.belarus.kamianiec.photo.photoSite.dao.ServicesDAO;
import com.belarus.kamianiec.photo.photoSite.domain.Services;

@org.springframework.stereotype.Service
public class ServicesServiceImpl implements ServicesService {

	private ServicesDAO servicesDAO;

	@Transactional
	public void addService(Services service) {
		servicesDAO.addService(service);
	}

	@Transactional
	public List<Services> listService() {

		return servicesDAO.listServices();
	}

	@Transactional
	public void removeService(Integer id) {
		servicesDAO.removeService(id);
	}

	public ServicesDAO getServicesDAO() {
		return servicesDAO;
	}

	@Autowired(required=false)
	public void setServicesDAO(ServicesDAO servicesDAO) {
		this.servicesDAO = servicesDAO;
	}
}
